package com.xiaolu.xiaoluaicodebackend.controller;


import com.xiaolu.xiaoluaicodebackend.common.BaseResponse;
import com.xiaolu.xiaoluaicodebackend.common.ResultUtils;
import com.xiaolu.xiaoluaicodebackend.model.vo.CaptchaVO;
import com.xiaolu.xiaoluaicodebackend.service.CaptchaService;
import jakarta.annotation.Resource;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;



@RestController
@RequestMapping("/captcha")
public class CaptchaController {

    @Resource
    private CaptchaService captchaService;

    /**
     * 获取图形验证码
     */
    @GetMapping("/")
    public BaseResponse<CaptchaVO> captcha() {

        return ResultUtils.success(captchaService.getCaptcha());
    }
}
